package com.shlh.saas.controller;

import com.shlh.saas.common.Result;
import com.shlh.saas.service.AnnouncementService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 管理员控制器
 */
@RestController
@RequestMapping("/announcements")
public class AnnouncementController {
    @Resource
    private AnnouncementService announcementService;

    @GetMapping("")
    public Result getAnnouncements(@RequestParam("status") Long status, @RequestParam("lang") String lang) {
        List<String> announcements = announcementService.getAnnouncements(status, lang);
        return Result.success(announcements);

    }
}
